﻿#pragma once

#include <QDialog>
#include "ui_HolidayOptionUI.h"
#include "CTPTime.h"

class HolidayOptionUI : public QDialog
{
	Q_OBJECT

public:
	HolidayOptionUI(QWidget *parent = Q_NULLPTR);
	~HolidayOptionUI();

private slots:
	// 添加一行
	void addOption();
	// 删除选中行
	void removeOption();
	// 保存
	void saveOption();
private:
	// 初始化界面
	void initUI();
	// Range转String
	void rangeToString(const CTPTm::DayRange &pRange, QString &outRangeBegin, QString &outRangeEnd);
	// String转Range
	void stringToRange(CTPTm::DayRange &outRange, const QString &pRangeBegin, const QString &pRangeEn);

	Ui::HolidayOptionUI ui;
};
